import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'h-string'
})
export class StringPipe implements PipeTransform {

  transform(value: any, args?: any): any {
    if(args != null){
      if(args.length >12){
        return args.substring(0,12)
      }
    }
    if(value == null){ 
      return '';
    }
    if(value.name == null){
      return ''
    }
    return value.name;
  }

}
